<template>
    <div>
        <label :for="id"><slot></slot></label>
        <input :type="type" :id="id" :value="modelValue" 
         @input="$emit('update:modelValue',$event.target.value)"
         @blur="$emit('validate')"  >
        <span>{{ info }}</span>
    </div>
</template>
<script setup>
import { defineProps,defineEmits } from 'vue';
const props = defineProps(["type","id","modelValue","info"]);
const emits = defineEmits(["abc","update:modelValue","validate"]);
function handleBlur(event){
    emits("abc",event.target.value);
}
// export default {
//     props:["type","id","modelValue","info"],
//     emits:["abc","update:modelValue","validate"],
//     methods:{
//         handleBlur(event){
//             this.$emit("abc",event.target.value);
//         }
//     }
// }
</script>
<style>
</style>